// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "MyPlayerController.h"
#include "Components/CapsuleComponent.h"
#include "GameFramework/DefaultPawn.h"
#include "GameFramework/Pawn.h"
#include "MyPawn.generated.h"
class AMyPlayerController;

UCLASS()
class  AMyPawn : public ADefaultPawn
{
	GENERATED_BODY()

public:
	// Sets default values for this pawn's properties
	AMyPawn();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	//X轴定点旋转
	void FixedPointRotation_X(float Rate, AMyPlayerController* PlayerController);
	//Y轴定点旋转
	void FixedPointRotation_Y(float Rate, AMyPlayerController* PlayerController);

	void MoveForward(float Rate);
	void MoveRight(float Rate);
	void MoveUp_World(float Rate);
public:
	//胶囊碰撞体
	UPROPERTY(EditAnywhere)
	UCapsuleComponent* CapsuleComponent;
	UPROPERTY(EditAnywhere)
	class UCameraComponent* CameraComp;
};
